﻿<div  class="deal_details">
    <div class="detail-data">
        <div class="export">
            <i class="fl report-icon-help" style="margin-top: 6px;" ui-tip  url="views/deal-statistics/tips1.html"></i>
            <div class="fl date">
                <a href="javascript:;" class="down" ng-click="query.exportDetailsData($event)">导出</a>
            </div>
        </div>

        <div class="report-content-auto" style="height: 480px;" ng-cloak
             ng-show="query.detailData.length">
            <table>
                <tbody>
                <tr class="bg-blur">
                    <th class="bg-th">项目名称</th>
                    <th class="bg-th">成交房间</th>
                    <th class="bg-th">认购信息</th>
                    <th class="bg-th">签约信息</th>
                    <th class="bg-th">客户信息</th>
                    <th class="bg-th">客户状态</th>
                    <th class="bg-th">经纪人信息</th>
                    <th class="bg-th">渠道身份</th>
                    <th class="bg-th">佣金信息</th>
                </tr>

                </tbody>
                <tbody   data-ng-repeat="item in query.detailData">
                <tr>
                    <td style="min-width:100px;"  rowspan="{{item.cst_list.length}}"><p class="textoverflow" title="{{item.proj_name}}">{{item.proj_name}}</p></td>
                    <td style="min-width:100px;"  rowspan="{{item.cst_list.length}}">{{item.room}}</td>
                    <td style="min-width:120px;"  rowspan="{{item.cst_list.length}}"><p ng-if="item.rg_amount">金额：{{item.rg_amount}}</p><p ng-if="item.rg_date">日期：{{item.rg_date | limitTo : 10}}</p></td>
                    <td style="min-width:120px;"  rowspan="{{item.cst_list.length}}"><p ng-if="item.qy_amount">金额：{{item.qy_amount}}</p><p ng-if="item.qy_date">日期：{{item.qy_date | limitTo : 10}}</p></td>
                    <td style="min-width:100px;"><p>{{item.cst_list[0]&&item.cst_list[0].cst_name}}{{(item.cst_list[0]&&item.cst_list[0].cst_gender)?'('+item.cst_list[0].cst_gender+')':''}}</p><p>{{item.cst_list[0]&&item.cst_list[0].cst_tel}}</p></td>
                    <td style="min-width:80px;">{{item.cst_list[0]&&item.cst_list[0].cst_status_txt}}</td>
                    <td style="min-width:100px;"><p>{{item.cst_list[0]&&item.cst_list[0].broker_name}}{{(item.cst_list[0]&&item.cst_list[0].broker_gender)?'('+item.cst_list[0].broker_gender+')':''}}</p><p>{{item.cst_list[0]&&item.cst_list[0].broker_tel}}</p></td>
                    <td style="min-width:80px;">{{item.cst_list[0]&&item.cst_list[0].capacity_des_text}}</td>
                    <td style="min-width:100px;"><p ng-if="item.cst_list[0]&&item.cst_list[0].brokerage_amount">金额：{{item.cst_list[0]&&item.cst_list[0].brokerage_amount}}</p><p ng-if="item.cst_list[0]&&item.cst_list[0].brokerage_status_text">状态：{{item.cst_list[0]&&item.cst_list[0].brokerage_status_text}}</p></td>
                </tr>
                <tr ng-if="item.cst_list.length>0&&$index>0" data-ng-repeat="cstItem in item.cst_list">
                    <td style="min-width:100px;"><p>{{cstItem.cst_name}}{{cstItem.cst_gender?'('+cstItem.cst_gender+')':''}}</p><p>{{cstItem.cst_tel}}</p></td>
                    <td style="min-width:80px;">{{cstItem.cst_status_txt}}</td>
                    <td style="min-width:100px;"><p>{{cstItem.broker_name}}{{cstItem.broker_gender?'('+cstItem.broker_gender+')':''}}</p><p>{{cstItem.broker_tel}}</p></td>
                    <td style="min-width:80px;">{{cstItem.capacity_des_text}}</td>
                    <td style="min-width:100px;"><p ng-if="cstItem.brokerage_amount">金额：{{cstItem.brokerage_amount}}</p><p ng-if="cstItem.brokerage_status_text">状态：{{cstItem.brokerage_status_text}}</p></td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="no-data" ng-if="!query.loading&&!query.hasDetailData">
            <span>暂无数据</span>
        </div>
    </div>
    <div ui-pagination page-index="query.detailPageIndex" page-size="query.detailPageSize" total="query.detailTotal"
         changed="query.queryDetail($pageIndex)"></div>
</div>